namespace PlexMediaLinker
{
    public static class Logger
    {
        public static event Action<string> LogReceived;
        
        public static void WriteLine(string message)
        {
            var logMessage = $"[{DateTime.Now:HH:mm:ss}] {message}";
            LogReceived?.Invoke(logMessage);
            Console.WriteLine(logMessage); // 保留控制台输出
        }
        
        public static void WriteInfo(string message)
        {
            WriteLine($"[Info] {message}");
        }
        
        public static void WriteError(string message)
        {
            WriteLine($"[Error] {message}");
        }
        
        public static void WriteDelete(string message)
        {
            WriteLine($"[Delete] {message}");
        }
        
        public static void WriteCopy(string message)
        {
            WriteLine($"[Copy] {message}");
        }
        
        public static void WriteScan(string message)
        {
            WriteLine($"[Scan] {message}");
        }
        
        public static void WriteClean(string message)
        {
            WriteLine($"[Clean] {message}");
        }
    }
}